<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel=stylesheet type="text/css" href="css/main.css" />
<link rel="stylesheet" type="text/css" href="css/jquery.fancybox.css" media="screen" />
<script src="js/jquery-1.8.0.min.js" type="text/javascript"></script>
<script src="js/jquery.fancybox.js" type="text/javascript"></script>
<script src="js/jquery.mousewheel-3.0.6.pack.js" type="text/javascript"></script>
<script type="text/javascript">
		$(document).ready(function() {
			$('.fancybox').fancybox();
		});
</script>
<title>教會相簿</title>
</head>
<body background="img/background_color.gif">
<?php 
include("Top.php"); 
include("menu.php"); 
?>
<table cellpadding="0" cellspacing="0" width="100%" background="img/background_color.gif" >
  <tr>
    <td>
    <table cellpadding="0" cellspacing="0" width="1000" background="img/context_background.gif" align="center">
      <tr valign="top">
        <td align="center" height="25">
        </td>
      </tr>
      <tr valign="top">
        <td align="center" height="25">
        <table cellpadding="0" cellspacing="0" width="920">
          <tr>
            <td align="left">
            <div class="pic_title"><?php echo $_REQUEST['album']; ?></div>
            </td>
          </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td height="10">
        </td>
      </tr>
      <tr>
        <td align="center">
        <table cellpadding="0" cellspacing="0" width="920" class="albumscontenttable">
          <tr>
           <?php
		   require_once("class/PhotoFunction.php");
		   $photoobject = new Photo('./albums');
		   $photoItems = $photoobject->getPhoto($_REQUEST['album']);
		   for($i=0; $i<count($photoItems); $i++){
		     if (($i+1)%5==0){
			 	echo "<td>
                        <a class='fancybox' href='" . $photoItems[$i][1] . "' data-fancybox-group='gallery' title='" . basename($photoItems[$i][0],".jpg") . "'>
                        <img src='" . $photoItems[$i][1] . "' width='150' height='100' border='0' /></a>
                      </td> 
                      </tr>
                      <tr>";
			 }else{
			 	echo "<td>
                        <a class='fancybox' href='" . $photoItems[$i][1] . "' data-fancybox-group='gallery' title='" . basename($photoItems[$i][0],".jpg") . "'>
                        <img src='" . $photoItems[$i][1] . "' width='150' height='100' border='0' /></a>
                      </td>";
			 }
		   }
		   ?>           
          </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td height="25" align="left">
        </td>
      </tr>
    </table>
    </td>
  </tr>
</table>

<?php 
include("Footer.php"); 
?>
</body>
</html>